package com.sanploy.manage.service;


import com.sanploy.common.domain.FreightModel;
import com.sanploy.common.vo.BaseException;

import java.util.List;

/**
 * Created by zhu yingzhi on 2017/9/14.
 * @author yingzhi zhu
 * 运费模板逻辑处理接口
 */
public interface FreightService {
    /**
     * 插入运费模板
     * 参数详见 FreightModel
     * @param name
     * @param is_free
     * @param province
     * @param city
     * @param county
     * @param detail
     * @param position
     * @param remote_json
     * @param local_json
     * @return
     */
    public int insertFreight(String name, boolean is_free, String province, String city, String county, String detail,
                             String position, String remote_json, String local_json);

    /**
     * 查找所有运费
     * @return 运费模板集合
     */
    public List<FreightModel> findAllFreight();

    /**
     * 更新运费模板
     * 参数详见 FreightModel
     * @param id
     * @param name
     * @param is_free
     * @param province
     * @param city
     * @param county
     * @param detail
     * @param position
     * @param remote_json
     * @param local_json
     * @return
     * @throws BaseException
     */
    public int updateFreight(Long id, String name, boolean is_free, String province, String city, String county, String detail,
                             String position, String remote_json, String local_json) throws BaseException;

    /**
     * 通过id查找运费模板
     * @param id 运费模板id
     * @return
     */
    public FreightModel findOne(Long id);
    public String test();
}
